// 前台路由
const express = require('express');
const router = express.Router();
const indexController = require('../controllers/indexController');
//娴首页
router.get('/', indexController.index);

//登录界面
router.get('/login', indexController.loginPage);

router.get('/register', indexController.registerPage);

router.post('/login', indexController.login);

router.post('/register', indexController.register);



// //注册界面
// router.get('/register', indexController.registerPage);
// router.post('/register', indexController.register)


//文章详情页
router.get('/detail/:id', indexController.detailPage);


//发布文章
router.get('/create', indexController.createArtical);
router.post('/create', indexController.sendArtical);




module.exports = router;